package cn.com.ejiakanghu.web;

import cn.com.ejiakanghu.core.vo.BaseResult;
import cn.com.ejiakanghu.form.AnnouncerQueryOrderForm;
import cn.com.ejiakanghu.service.AnnouncerManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("announcer")
public class AnnouncerController {
    @Autowired
    private AnnouncerManager announcerManager;

    @RequestMapping("/addPrinter")
    public BaseResult addPrinter(@RequestParam String annoNum, @RequestParam Integer storeId, @RequestParam String sn, @RequestParam String key) {
        return announcerManager.addPrinter(annoNum, storeId, sn, key);
    }

    @RequestMapping("/queryOrder")
    public BaseResult queryOrder(@RequestBody AnnouncerQueryOrderForm announcerQueryOrderForm) {
        return announcerManager.queryOrder(announcerQueryOrderForm);
    }
}
